<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>微信用户</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/easyui/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/inputfile.css">
    <script type="text/javascript" src="${pageContext.request.contextPath}/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/easyui/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/easyui/datagrid-detailview.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/template-native.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/other.js"></script>
    <script>
        $(function(){
            $('#userlist').datagrid({

                url: "${pageContext.request.contextPath}/users/findByPage",
                // data: {
                //     total: 20,
                //     rows: [
                //         { id: '1', openid: '08sdfip23jpiojwfioj289923', name: '张三',headurl:'123534634.jpg'},
                //         { id: '2', openid: '08sdfip23jpiojwfiwerewr2q', name: '李四',headurl:'123534634.jpg'},
                //         { id: '3', openid: '08sdsadfdsafsdafsdaqweqwe', name: '王五',headurl:'123534634.jpg'},
                //         { id: '4', openid: '08sdfsadfvcadscasads23fds', name: '赵六',headurl:'123534634.jpg'},
                //     ]
                // },
                columns: [[
                    { title: '序号', field: 'id', width: '10%', align: 'center' },
                    { title: '微信openid', field: 'openid', width: '20%', align: 'center' },
                    { title: '昵称', field: 'name', width: '20%', align: 'center' }
                ]],
                title: '微信用户列表',
                iconCls: 'icon-save',
                width: '100%',
                singleSelect: true,
                pagination: true,
                pageSize: 5,
                pageList: [5, 10, 20],
                toolbar: '#tb',
                view: detailview,
                detailFormatter: function (rowIndex, rowData) {
                    let html = "<img src=https://ysd.eastarchain.net/eastarimg/" + rowData.url + " style='width:200px;'/>"
                    return html;
                },
            });

        });
    </script>
</head>
<body>
    <!-- 数据展示 start -->
    <table id="userlist"></table>
    <!-- 数据展示 end -->

</body>
</html>